Methods of generating gas in well fluids

ABSTRACT

Improved methods of generating gas in and foaming aqueous well fluids introduced into a subterranean zone are provided. A method of the invention includes the steps of combining with an alkaline aqueous well fluid one or more gas generating chemicals and a mixture of foaming and foaming stabilizing surfactants so that the gas generating chemical or chemicals react with the alkaline aqueous well fluid and gas and foam are formed in the well fluid while it is being pumped, and then pumping the well fluid into the subterranean zone.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to methods of chemically generatinggas in aqueous fluids utilized in the drilling and completion of wellssuch as drilling fluids, spacer fluids and aqueous acid solutions.

[0003] 2. Description of the Prior Art

[0004] Foamed aqueous fluids have heretofore been utilized in a numberof oil and gas well applications. Typically, the aqueous fluids arefoamed by combining mixtures of foaming and foam stabilizing surfactantswith the fluids on the surface followed by injecting gas, typicallynitrogen, into the fluids containing the foaming and foam stabilizingsurfactants as the fluids are pumped to the well head and into the wellbore. This process allows the final foamed fluid to have gasconcentrations of 1% to 80% by volume of the fluid depending on thedownhole pressure and temperature and the amount of gas injected atsurface. The equipment and personnel required for storing the nitrogenin liquid or gaseous form and injecting it into well fluids is veryelaborate and expensive. In addition, the equipment is frequentlyunavailable or cannot be easily transported to well sites due to theirremote locations.

[0005] In-situ gas forming agents have been utilized heretofore in wellcement compositions to prevent annular gas migration. For example,surfactant coated finely ground aluminum has been included in cementcompositions to generate hydrogen gas in the compositions as they arebeing pumped down a well bore and after they are placed in the annulusbetween the walls of the well bore and casing or other pipe stringtherein. The presence of the gas in the cement compositions preventsformation fluids from entering the cement compositions as the cementcompositions develop gel strength. That is, the development of gelstrength and the cement hydration reaction that takes place reduces theability of a cement composition column to transmit hydrostatic pressure.If the hydrostatic pressure of the cement composition column falls belowthe formation pore pressure before the cement composition has gainedsufficient strength to prevent the entry of formation fluids into thewell bore, the fluids enter the well bore and form channels in thecement composition column which remain after the cement compositioncolumn sets. The presence of the gas which is generated in the cementcomposition from the finely ground aluminum increases the volume of thecement composition such that the volume increase generated by the gasequals or slightly exceeds the cement composition volume reductionduring the development of gel strength due to fluid loss and/or thecement hydration reaction. The increase in volume, typically less than5%, and the compressibility produced in the cement composition by thegas allows the cement composition column to resist the entry offormation fluids into the well bore.

[0006] Other gas forming agents have also been added to well cementcompositions to gasify the compositions. For example, U.S. Pat. No.4,450,010 issued on May 22, 1984 to Burkhalter et al. discloses a wellcementing method and gasified cements useful in carrying out the method.That is, U.S. Pat. No. 4,450,010 discloses a method of cementing insubterranean formations using a gasified cement composition whichprevents formation fluids from entering the cement composition columnformed in the annulus between the well bore and a pipe string therein.The cement composition includes a nitrogen gas generating material, anoxidizing agent and a reaction rate control material whereby a quantityof gas is generated in the cement composition to offset the shrinkage inthe cement composition column as it develops gel strength and to providecompressibility thereto whereby the entry of formation fluids into thewell bore is reduced or prevented.

[0007] A situation where the presence of gas would provide a distinctadvantage involves problems associated with high fluid pressure buildupbehind casing. Occasionally, aqueous drilling fluids, spacer fluids orboth are left behind casing during the cementing phase of wellconstruction. When the well is put on production, the formationtemperature heats up the trapped drilling and/or spacer fluids causingsevere high pressure buildups due to the incompressibility of the fluidswhich can cause damage to the casing. The presence of a compressible gasbehind the casing in drilling fluids, spacer fluids and the like, eitherin the form of a gas pocket or foam would help sustain the temperatureincreases without severe pressure buildups.

[0008] Other applications where the presence of gas in aqueous drillingfluids, aqueous spacer fluids, aqueous acid solutions and the like wouldprovide distinct advantages include drilling and well treating fluidhydrostatic pressure reduction to prevent formation fractures, drillcuttings removal, the displacement of drilling fluids in an eccentricannulus, hydrostatic fracture pressure control, fluid loss control andspent acid solution recovery.

[0009] While the methods of the prior art have achieved varying degreesof commercial success, there is a need for improved methods ofgenerating gas in and foaming well fluids whereby elaborate andexpensive equipment for producing the gas is not required.

SUMMARY OF THE INVENTION

[0010] The present invention provides improved methods of generating gasin and foaming well fluids such as aqueous drilling fluids, aqueousspacer fluids, aqueous acid solutions and the like introduced intosubterranean zones penetrated by well bores which meet the needsdescribed above and overcome the deficiencies of the prior art. Inaccordance with this invention nitrogen gas is generated chemically inaqueous drilling fluids, spacer fluids and the like in a concentrationof from about 1% to about 80% of the fluid volume for the purpose ofpreventing trapped fluid pressure increases, reducing fluid hydrostaticpressure, removing drill cuttings, displacing drilling fluids in aneccentric annulus, controlling fracture pressure and controlling fluidloss.

[0011] An improved method of the present invention for generating gas inand foaming an aqueous drilling fluid, an aqueous spacer fluid and othersimilar well fluids comprises the following steps. One or more gasgenerating chemicals are combined with the aqueous well fluid on thesurface. At approximately the same time, a mixture of foaming and foamstabilizing surfactants and when needed, an activator for said one ormore gas generating chemicals selected from a base or buffer forincreasing the pH of the well fluid to in the alkaline range of fromabout 10 to about 14 or one or more oxidizing chemicals are combinedwith the well fluid so that the gas generating chemical or chemicalsreact with the alkaline well fluid or the oxidizing chemical orchemicals and gas and foam are formed in the fluid while it is beingpumped. Thereafter, the well fluid containing the gas generatingchemicals, the foaming and foam stabilizing surfactants and when needed,an activator is pumped into a well bore.

[0012] Gas generating chemicals which are useful in accordance with thepresent invention include, but are not limited to, compounds containinghydrazine or azo groups, for example, hydrazine and its salts withacids, azodicarbonamide, azobis(isobutyronitrile), p-toluene sulfonylhydrazide, p-toluene sulfonyl semicarbazide, carbohydrazide,p-p′-oxybis(benzenesulfonylhydrazide and mixtures thereof. Additionalexamples of nitrogen gas generating chemicals which do not containhydrazine or azo groups which are also useful in the present inventioninclude, but are not limited to, ammonium salts of organic or inorganicacids, hydroxylamine sulfate, carbamide and mixtures thereof.

[0013] An improved method of chemically generating gas in and foaming anaqueous acid solution introduced into a subterranean zone penetrated bya well bore to increase the hydrocarbon permeability of the zone orother similar purpose is also provided by the present invention. Thepresence of the gas in the acid solution assists the recovery of thespent acid from the subterranean zone. The method basically comprisesthe steps of combining one or more gas generating chemicals with anaqueous solution containing an activator selected from the group of abase or buffer for raising the pH of the aqueous solution to in thealkaline range of from about 10 to about 14 or one or more oxidizingagents to generate gas. The gas is then combined with the aqueous acidsolution as the aqueous acid solution is pumped into the well bore andthe subterranean zone whereby the aqueous acid solution is foamed.

[0014] The objects, features and advantages of the present inventionwill be readily apparent to those skilled in the art upon a reading ofthe description of preferred embodiments which follows.

DESCRIPTION OF PREFERRED EMBODIMENTS

[0015] The present invention provides improved methods of generating gasin and foaming aqueous well fluids such as aqueous drilling fluids,aqueous spacer fluids, aqueous acid solutions and the like.

[0016] Aqueous well drilling fluids are generally solids containingwater based gels which can include a weighting material. When alightweight aqueous drilling fluid is required in order to prevent thehydrostatic pressure of the drilling fluid from creating fractures inweak formations, the drilling fluid can be foamed in accordance withthis invention.

[0017] Aqueous spacer fluids are often used in oil and gas wells tofacilitate improved displacement efficiency when pumping new fluids intothe well bore. The spacer fluids are typically placed between one ormore fluids contained within or to be pumped within the well bore.Examples include placing spacer fluids between a hydraulic cement slurryand a drilling fluid, between different drilling fluids during drillingfluid change outs or between a drilling fluid and a completion brine.Spacers are also used to enhance solids removal during drillingoperations, to enhance displacement efficiency and to physicallyseparate chemically incompatible fluids.

[0018] Most spacer fluids are comprised of water, a viscosity and fluidloss control additive, a weighting material and a surfactant. Theweighting material included in the spacer fluid is to increase itsdensity for well control and increase the buoyancy effect of the spacerfluid on the gelled drilling fluid and filter cake adhered to the wallsof the well bore. Viscosity additives are intended to producerheological properties which provide suspended particle stability andfluid loss control to the spacer fluid. When a surfactant is included inthe spacer fluid it is intended to enhance the chemical compatibility ofthe spacer fluid with the other fluids and to water-wet surfaces for animproved cement bond and better removal of well bore solids. In someapplications, it is desirable to foam spacer fluids to improve fluiddisplacement and for reducing the hydrostatic pressure of the fluidcolumn in the well bore.

[0019] In accordance with the methods of this invention, one or more gasgenerating chemicals are combined with an aqueous well fluid on thesurface. At approximately the same time, a mixture of foaming and foamstabilizing surfactants and when needed, an activator for said one ormore gas generating chemicals selected from a base or buffer forincreasing the pH of the well fluid to in the range of from about 10 toabout 14 or one or more oxidizing chemicals with or without one or morerate control agents are combined with the aqueous well fluid so that thegas generating chemicals react with the alkaline well fluid or theoxidizing chemicals and gas and foam are formed in the well fluid whileit is being pumped. Thereafter, the well fluid is pumped into a wellbore.

[0020] When the methods of this invention are utilized to foam aqueouswell fluids that are already alkaline, i.e., have a pH in the range offrom about 10 to about 14, the activators described above are notneeded. That is, the gas generating chemicals react with the alkalineaqueous well fluids upon mixing therewith.

[0021] The gas generating chemicals useful in accordance with thisinvention primarily generate nitrogen along with small amounts ofammonia depending on the chemical structure and the activating chemicalor chemicals. When the gas generating chemical molecule contains amidegroups, additional ammonia, carbon dioxide (an acidic gas), and carbonmonoxide may be produced. The gas generating chemicals are generallysolid materials that liberate gas or gases on their own when they areheated to a temperature in the range of from about 200° F. to about 500°F. without requiring alkaline conditions or oxidizing chemicals. Inorder to cause the gas generating chemicals to generate gases at atemperature below about 200° F., e.g., at ambient temperature, analkaline chemical or an oxidizing chemical with or without a ratecontrol agent can be combined with the aqueous well fluid containing theone or more gas generating chemicals and foaming and foam stabilizingsurfactants. Depending on the structure of the gas generating chemical,it may dissolve in the aqueous well fluid or it may have to be used as adispersion.

[0022] Examples of gas generating chemicals which can be utilized inaccordance with the methods of the present invention include, but arenot limited to, chemicals containing hydrazine or azo groups such ashydrazine, azodicarbonamide, azobis(isobutyronitrile), p-toluenesulfonyl hydrazide, p-toluene sulfonyl semicarbazide, carbohydrazide,p,p′-oxybis(benzenesulfonyl hydrazide) and mixtures thereof. Otherexamples of nitrogen generating chemicals include, but are not limitedto, ammonium salts of organic or inorganic acids, hydroxylamide sulfate,carbamide and mixtures thereof. Of the gas generating chemicals whichcan be used, azodicarbonamide and carbohydrazide are preferred. The gasgenerating chemical or chemicals utilized are combined with the aqueouswell fluid in a general amount, depending on the amount of gas desiredunder downhole conditions, in the range of from abut 0.1% to about 10%by weight of water in the aqueous well fluid, more preferably in anamount in the range of from about 0.3% to about 8% and most preferablyabout 4%.

[0023] The generation of gas from the gas generating chemicals dependson the structure of the gas generating chemicals. When the chemicalcontains an azo group containing two nitrogens connected by a doublebond as in azodicarbonamide, the gas generation is caused eitherthermally or by reaction with alkaline reagents which by reacting withthe azocarbonamide generate ammonia gas, carbon dioxide and release thedoubly charged diimide group. The diimide dianion being chemicallyunstable decomposes to nitrogen gas.

[0024] The gas generating chemicals containing hydrazide groups in whichthe two nitrogen atoms are connected by a single bond as well asconnected to one or two hydrogens produce gas upon reaction withoxidizing chemicals. It is believed that the oxidizing agent oxidizesthe hydrazide group to azo structure. Occasionally, additional activatorchemicals may be needed to increase the rate of gas production.

[0025] While various activators can be utilized to make the aqueous wellfluid to be foamed alkaline, a preferred activator is a base such asalkali metal hydroxides, alkaline earth metal hydroxides or alkalinemetal salts of silicates present in the well fluid in an amountsufficient to maintain the pH of the fluid in the 10 to 14 range duringthe gas production phase. A buffer composition which can maintain the pHin the desired range can also be used. Examples of suitable buffercompositions include mixtures of potassium phosphate and potassiummonohydrogenphosphate or sodium carbonate and sodium bicarbonate.

[0026] Examples of the oxidizing chemical activators which can be usedinclude, but are not limited to, alkaline and alkaline earth metal saltsof peroxide, persulfate, perborate, chlorite, chlorate, iodate, bromate,chloroaurate, arsenate, antimonite and molybate anions. Specificexamples of the oxidizing agents include ammonium persulfate, sodiumpersulfate, potassium persulfate, sodium chlorite, sodium chlorate,hydrogen peroxide, sodium perborate and sodium peroxy carbonate. Otherexamples of oxidizing chemicals which can be used in the presentinvention are disclosed in U.S. Pat. No. 5,962,808 issued to Landstromon Oct. 5, 1999 which is incorporated herein by reference thereto. Ofthe oxidizing chemicals which can be used, sodium persulfate and sodiumchlorite are the most preferred. When used, one or more oxidizingchemicals are included in the well fluid in an amount in the range offrom about 200% to about 1500% by weight of the gas generating chemicalor chemicals therein, more preferably in an amount in the range of fromabout 400% to about 1200% by weight of the gas generating chemical orchemicals. The oxidizing chemical or chemicals used and their amountsare selected for their ability to cause the gas generating chemical orchemicals to generate gas at a particular temperature or range oftemperatures. The temperatures at which various oxidizing chemicalscause a particular gas generating chemical to produce gas can be readilydetermined in the laboratory.

[0027] As mentioned above, a gas production rate enhancing agent can beused when rapid gas production is desired. Examples of such rateenhancing agents include, but are not limited to, copper salts such ascopper sulfate and iron salts including ferric sulfate or ferricnitrate. When used, the gas production rate enhancing agent is includedin the well fluid in an amount in the range of from about 5% to about25% by weight of the gas generating chemical or chemicals therein.

[0028] The mixture of foaming and foam stabilizing surfactants iscombined with the aqueous well fluid to facilitate the formation andstabilization of foam in the well fluid produced by the liberation ofgas therein. An example of such a mixture of foaming and foamstabilizing surfactants which is preferred for use in accordance withthis invention is comprised of a mixture of an ethoxylated alcohol ethersulfate surfactant, an alkyl or alkene amidopropylbetaine surfactant andan alkyl or alkene amidopropyldimethylamine oxide surfactant. Such asurfactant mixture is described in U.S. Pat. 6,063,738 issued toChatterji et al. on May 16, 2000 which is incorporated herein byreference thereto. The mixture of foaming and foam stabilizingsurfactants is present in said well fluid in an amount in the range offrom about 0.5% to about 5% by weight of water in the aqueous wellfluid.

[0029] Thus, an improved method of this invention for generating gas inand foaming an aqueous drilling fluid, an aqueous spacer fluid or othersimilar aqueous well fluid pumped into a subterranean zone penetrated bya well bore is comprised of the steps of:

[0030] (a) combining with the aqueous well fluid one or more gasgenerating chemicals, a mixture of foaming and foam stabilizingsurfactants and when needed, an activator for the one or more gasgenerating chemicals selected from the group consisting of a base orbuffer for increasing the pH of the well fluid to in the alkaline rangeof from about 10 to about 24 and an oxidizing agent so that the gasgenerating chemicals react with the alkaline well fluid or the oxidizingagent and gas and foam are formed in the well fluid while it is beingpumped; and

[0031] (b) pumping the aqueous well fluid into the well bore and thesubterranean zone.

[0032] As mentioned above the well fluid can optionally include a rateenhancing chemical to increase the rate of gas production from the oneor more gas generating chemicals at a selected temperature.

[0033] Another preferred improved method of this invention forgenerating gas in and foaming an aqueous well fluid such as an aqueousdrilling fluid, an aqueous spacer fluid and the like which is pumpedinto a subterranean zone penetrated by a well bore is comprised of thesteps of:

[0034] (a) combining with the aqueous well fluid a gas generatingchemical comprised of azodicarbonamide in an amount in the range of fromabout 0.3% to about 8% by weight of water in the aqueous well fluid, amixture of foaming and foam stabilizing surfactants present in an amountin the range of from about 0.5% to about 5% by weight of water in theaqueous well fluid and an activator for the gas generating chemicalselected from the group consisting of a base or buffer in an amountsufficient to increase the pH of the well fluid to in the range of fromabout 10 to about 14 so that the gas generating chemical reacts with thealkaline well fluid and gas and foam is formed in the well fluid whileit is being pumped; and

[0035] (b) pumping the well fluid into the well bore and thesubterranean zone.

[0036] Yet another preferred improved method of this invention forgenerating gas in and foaming an aqueous well fluid such as an aqueousdrilling fluid, an aqueous spacer fluid and the like which is pumpedinto a subterranean zone penetrated by a well bore is comprised of thesteps of:

[0037] (a) combining with the aqueous well fluid a gas generatingchemical comprised of azodicarbonamide in an amount in the range of fromabout 0.3% to about 8% by weight of water in the aqueous well fluid, amixture of foaming and foam stabilizing surfactants present in an amountin the range of from about 0.5% to about 5% by weight of water in theaqueous well fluid and an activator for the gas generating chemicalcomprised of an oxidizing chemical so that the gas generating chemicalreacts with the oxidizing chemical and gas and foam are formed in theaqueous well fluid while it is being pumped; and

[0038] (b) pumping the aqueous well fluid formed in step (a) into thewell bore and the subterranean zone.

[0039] In certain circumstances, it is desirable to foam an aqueous acidsolution which is introduced into a subterranean zone to increase thehydrocarbon permeability of the zone. The presence of the gas in thefoamed acid solution assists in the recovery of the spent acid from thesubterranean zone.

[0040] In accordance with the present invention, an aqueous solution ordispersion of one or more gas generating chemicals is combined with anactivator for the gas generating chemicals selected from the groupconsisting of a base or buffer for increasing the pH of the aqueoussolution or dispersion to in the alkaline range of from about 10 toabout 14 and an oxidizing chemical so that the gas generating chemicalsreact with the alkaline solution or dispersion or the oxidizing chemicalon the surface to generate gas. The gas is then combined with theaqueous acid solution in an amount sufficient to foam the aqueous acidsolution as the aqueous acid solution is pumped into the well bore andinto the subterranean zone to be acidized whereby the aqueous acidsolution is foamed.

[0041] One or more of the gas generating chemicals described above canbe utilized to form the aqueous solution or dispersion of gas generatingchemicals. The water utilized can be any type of water so long as itdoes not contain components which adversely react with the gasgenerating chemicals. The activator can be a base or buffer as describedabove or one or more of the oxidizing chemicals described above.Generally, the gas generating chemical or chemicals used are included inthe solution or dispersion in an amount in the range of from about 10%to about 100% by weight of water therein. As mentioned, when theactivator is a base or buffer it is added to the aqueous solution ordispersion in an amount sufficient to raise the pH of the solution ordispersion to in the range of from 10 to about 14. One or more of theoxidizing chemical activators described above can be utilized instead ofor in addition to the base or buffer in an amount in the range of fromabout 400% to about 1200% by weight of the gas generating chemical orchemicals in the solution or dispersion.

[0042] When a base or buffer activator or an oxidizing chemicalactivator, or both, are combined with the aqueous solution or dispersionof one or more gas generating chemicals, the gas evolved from themixture is collected and combined with the aqueous acid solution whichcan include a mixture of foaming and foam stabilizing surfactants suchas linear alcohol (C10-C13) ethoxylates (10-20 moles ethylene oxide),betaines (e.g., cocoamidopropyl betaine) and nonylphenol ethoxylate (2moles ethylene oxide) in an amount in the range of from about 1% to 5%by weight of water in the combined acid solution.

[0043] The aqueous acid solution utilized can include, but is notlimited to hydrochloric acid, hydrofluoric acid, fluoboric acid andmixtures thereof. The aqueous acid solution can also include one or moreorganic acids including, but not limited to, formic acid, acetic acid,citric acid, lactic acid, thioglycolic acid and glycolic acid.Generally, the inorganic acid is present in the aqueous acid solution inan amount in the range of from about 5% to about 30% by weight of theaqueous acid solution. When used, the organic acid can be present in anamount up to about 10% by weight of the aqueous acid solution.

[0044] An improved method of this invention for chemically generatinggas and foaming an aqueous acid solution which is introduced into asubterranean zone penetrated by a well bore to increase the hydrocarbonpermeability of the zone, the presence of the gas in the foamed acidsolution assisting in the recovery of the spent acid from thesubterranean zone, comprising the steps of: (a) combining an aqueoussolution or dispersion of one or more gas generating chemicals with anactivator for the gas generating chemicals selected from the groupconsisting of a base or buffer for increasing the pH of the aqueoussolution or dispersion to in the alkaline range of from about 10 toabout 14 and an oxidizing chemical so that the gas generating chemicalsreact with the alkaline well fluid or the oxidizing chemical on thesurface to generate gas; and (b) combining the gas with the aqueous acidsolution in an amount sufficient to foam the aqueous acid solution asthe aqueous acid solution is pumped into the well bore and thesubterranean zone to be acidized whereby the aqueous acid solution isfoamed.

[0045] In order to further illustrate the methods of the presentinvention, the following examples are given.

EXAMPLE 1

[0046] A spacer fluid was prepared as described in U.S. Pat. No.5,789,352 issued to Carpenter et al. on Aug. 14, 1998 which isincorporated herein by reference thereto. An aqueous mixture of foamingand foam stabilizer surfactants comprising alcohol ether sulfate,cocoamidopropyl betaine and an amine oxide in water was stirred by handinto the spacer fluid in an amount of about 1.83% by weight of water inthe spacer fluid. The density of the spacer fluid was 16.35 pounds pergallon and the pH of the fluid was 9.1. In a graduated cylindercontaining 20 ml of the spacer fluid, azodicarbonamide was added in anamount of 2% by weight of water present in the spacer fluid. The pH wasadjusted to 12.2 by the addition of a few drops of 17% sodium hydroxidesolution. As the resulting reaction progressed, the pH decreased.Periodically, the pH was adjusted to 12.2 by additional sodium hydroxidesolution. The final fluid volume was 42 ml and final density was 7.73pounds per gallon. The percent nitrogen gas present in the fluid was 50%by volume.

[0047] An identical experiment to the above was performed bysubstituting toluene sulfonyl hydrazide for the azodicarbonamide in anamount of 3% by weight of water in the spacer fluid. Additionally, 2.5ml of 37% sodium persulfate solution in water was added in 0.5 mlportions. The pH was adjusted to 11.0 periodically as necessary. At theend of the experiment, the volume of the foamed fluid was 42 ml(density—7.84 pounds per gallon; % nitrogen gas in the fluid—48% byvolume).

[0048] Another experiment identical to the preceding experiment wasconducted by substituting 37% by volume sodium chlorite solution inwater for the 37% by volume sodium persulfate solution. The initial pHwas adjusted to 10.7. No additional pH adjustment was found necessaryduring the course of the addition of the sodium chlorite solution. Thefinal volume of 48 ml (density—7.28 pounds per gallon; % nitrogengas—54% by volume) was reached much quicker (10 min vs. 2 hrs) than inthe preceding case.

[0049] Another experiment identical to the preceding experiment wasperformed by replacing toluene sulfonyl hydrazide with 1% carbohydrazideby weight of water. A pH adjustment was not necessary since the pH didnot change during the course of the reaction. The final volume at theend of the reaction period, was 70 ml (density—4.9 pounds per gallon; %nitrogen gas—68% by volume).

[0050] Another experiment identical to the preceding experiment wasperformed by replacing the sodium chlorite with an equal volume of 37%sodium persulfate solution. The final volume was 40 ml (density—8.75pounds per gallon; % nitrogen gas—45% by volume). The above experimentsclearly demonstrate that spacer fluid compositions used in oil welloperations can be foamed by generating nitrogen gas in-situ.

EXAMPLE 2

[0051] A test was conducted using Halliburton's UCA (Ultrasonic CementAnalyzer) equipment. About 110 ml of a drilling fluid was placed in theUCA cell with a volume capacity of 220 ml. The cell was pressurized to2000 psi and placed in the UCA heating jacket. The temperature wasbrought to 80° F.

[0052] A sample of the spacer fluid described in Example 1 including themixture of the foaming and foam stabilizing surfactants was placed in astirring autoclave and heated to 80° F. A pressure of 2000 psi wasapplied and the sample of spacer fluid was foamed to contain specifiedvolume of air. The foamed spacer fluid was transferred under pressureinto the UCA cell. The UCA was programmed to heat up to 200° F. over aspecified period. The resulting pressure increases were recorded at 140°F., 180° F. and 200° F. The test was repeated with different drillingfluids and spacer fluids containing different volumes of air and finallywith tap water. The results are presented in the Table below. TABLEDrilling And Spacer Fluids Tested And Resulting Pressures Fluid Sample80° F. 140° F. 180° F. 200° F. 100% “NOVA Plus ™”¹ 2000 psi 5400 psi9200 psi 10,000 psi   50% “NOVA Plus ™” and 50% - Spacer with 10% air2000 psi 2100 psi 2400 psi 2600 psi 50% “NOVA Plus ™” and 50% - Spacerwith 20% air 2000 psi 2100 psi 2300 psi 2400 psi 50% “NOVA Plus ™” and50% - Spacer with 40% air 2000 psi 2000 psi 2100 psi 2200 psi 100%“Cal-Drill Mud ™”² 2000 psi 6500 psi 10,000 psi   11,400 psi   50%“Cal-Drill Mud ™” and 50% - Spacer with 10% air 2000 psi 3000 psi 3700psi 3800 psi 50% “Cal-Drill Mud ™” and 50% - Spacer with 20% air 2000psi 2500 psi 2700 psi 2900 psi 50% “Cal-Drill Mud ™” and 50% - Spacerwith 40% air 2000 psi 2100 psi 2200 psi 2250 psi 65% Oil/ester baseddrilling fluid and 35% Spacer with 2000 psi 2200 psi 2300 psi 2500 psi10% in-situ generated nitrogen Tap Water 2000 psi 4800 psi 8200 psi10,300 psi

[0053] The results clearly show that when a gas is present in a fluidsystem, for example, as would be in the case of spacer and drillingfluid left behind a casing in a completed oil well, the pressureincreases exerted on the pipe due to heating of the fluids by theformation are considerably less when the fluids contain gas than whenthere is no gas present. The prevention of excessive pressure buildupbehind a casing in a well prevents well blow outs and casing collapses.

EXAMPLE 3

[0054] A representative water-based drilling fluid was prepared bymixing with shear in a Waring blender bentonite clay (10 pounds perbarrel), mixed metal silicate available from Baroid Corporation underthe trade name “RV-310™” (0.75 pounds per barrel),carboxymethylcellulose (4 pounds per barrel), barium sulfate in tapwater (90 pounds per barrel), and a foaming and foam stabilizingsurfactant mixture comprising alcohol ether sulfate, cocoamidopropylbetaine and an amine oxide in water was stirred by hand into thedrilling fluid (3.5% by weight of water in the drilling fluid). Thedensity of the resulting drilling fluid was 9.72 pounds per gallon, andthe pH of the fluid was 11.94.

[0055] In a graduated cylinder containing 20 ml of the drilling fluidsolid azodicarbonamide was added (0.5% by weight of water) with gentlestirring. In 90 minutes, the volume increased to 28 ml (density—6.91pounds per gallon).

[0056] Another experiment identical to the preceding experiment wasperformed except that 1% azodicarbonamide by weight of water was addedto the drilling fluid. In 90 minutes, the volume increase was same as inthe preceding experiment. The pH was not adjusted in either of the aboveexperiments.

[0057] Another experiment identical to the preceding was performedexcept that the azodicarbonamide was replaced with carbohydrazide (0.5%by weight of water). To this mixture, 1 ml of 37% sodium chloritesolution was added with stirring. In 15 minutes, the fluid volumeincreased to 30 ml (density—6.45 pounds per gallon).

[0058] The above results clearly show that drilling fluids can be foamedby chemically generating nitrogen gas in-situ.

[0059] Thus, the present invention is well adapted to carry out theobjects and attain the ends and advantages mentioned as well as thosewhich are inherent therein. While numerous changes can be made by thoseskilled in the art, such changes are encompassed within the spirit ofthis invention as defined by the appended claims.

What is claimed is:
 1. An improved method of generating gas in andfoaming an alkaline aqueous well fluid such as an aqueous drillingfluid, an aqueous spacer fluid and the like introduced into asubterranean zone penetrated by a well bore comprising the steps of: (a)combining with said alkaline aqueous well fluid one or more gasgenerating chemicals and a mixture of foaming and foam stabilizingsurfactants whereby said gas generating chemical or chemicals react withsaid alkaline aqueous well fluid and gas and foam are formed in saidwell fluid while it is being pumped; and (b) pumping said alkalineaqueous well fluid formed in step (a) into said well bore and saidsubterranean zone.
 2. The method of claim 1 wherein said well fluid isan alkaline aqueous drilling fluid.
 3. The method of claim 1 whereinsaid well fluid is an alkaline aqueous spacer fluid.
 4. The method ofclaim 1 wherein said gas generating chemical or chemicals are selectedfrom the group consisting of hydrazine and its salts with acids,azodicarbonamide, azobis(butyronitrile), p-toluene sulfonyl hydrazide,p-toluene sulfonyl semicarbazide, carbohydrazide,p-p′-oxybis(benzenesulfonylhydrazide) and mixtures thereof.
 5. Themethod of claim 1 wherein said gas generating chemical is selected fromthe group consisting of azodicarbonamide and carbohydrazide.
 6. Themethod of claim 1 wherein said gas generating chemical or chemicals arepresent in said aqueous well fluid in an amount in the range of fromabout 10% to about 100% by weight of water in said aqueous well fluid.7. The method of claim 1 wherein said mixture of foaming and foamstabilizing surfactants is comprised of an ethoxylated alcohol ethersulfate surfactant, an alkyl or alkene amidopropyl betaine surfactantand an alkyl or alkene amidopropyl dimethylamine oxide surfactant. 8.The method of claim 1 wherein said mixture of foaming and foamstabilizing surfactants is present in said aqueous well fluid in anamount in the range of from about 0.5% to about 5% by weight of water insaid aqueous well fluid.
 9. The method of claim 1 wherein said alkalineaqueous well fluid further comprises a gas production rate enhancingagent selected from the group consisting of copper sulfate, ferricsulfate and ferric nitrate.
 10. An improved method of generating gas inand foaming an aqueous well fluid such as an aqueous drilling fluid, anaqueous spacer fluid and the like introduced into a subterranean zonepenetrated by a well bore comprising the steps of: (a) combining withsaid aqueous well fluid one or more gas generating chemicals, a mixtureof foaming and foam stabilizing surfactants and when needed, anactivator for said one or more gas generating chemicals selected fromthe group consisting of a base or buffer for increasing the pH of saidaqueous well fluid to in the alkaline range of from about 10 to about 14and one or more oxidizing chemicals so that said gas generating chemicalor chemicals react with said alkaline aqueous well fluid or said one ormore oxidizing chemicals and gas and foam are formed in said aqueouswell fluid while it is being pumped; and (b) pumping said aqueous wellfluid formed in step (a) into said well bore and said subterranean zone.11. The method of claim 10 wherein said aqueous well fluid is an aqueousdrilling fluid.
 12. The method of claim 10 wherein said aqueous wellfluid is an aqueous spacer fluid.
 13. The method of claim 10 whereinsaid gas generating chemical or chemicals are selected from the groupconsisting of hydrazine and its salts with acids, azodicarbonamide,azobis(butyronitrile), p-toluene sulfonyl hydrazide, p-toluene sulfonylsemicarbazide, carbohydrazide, p-p′-oxybis(benzenesulfonylhydrazide) andmixtures thereof.
 14. The method of claim 10 wherein said gas generatingchemical is selected from the group consisting of azodicarbonamide andcarbohydrazide.
 15. The method of claim 10 wherein said gas generatingchemical or chemicals are present in said aqueous well fluid in anamount in the range of from about 0.1% to about 10% by weight of waterin said aqueous well fluid.
 16. The method of claim 10 wherein saidmixture of foaming and foam stabilizing surfactants is comprised of anethoxylated alcohol ether sulfate surfactant, an alkyl or alkeneamidopropyl betaine surfactant and an alkyl or alkene amidopropyldimethylamine oxide surfactant.
 17. The method of claim 10 wherein saidmixture of foaming and foam stabilizing surfactants is present in saidaqueous well fluid in an amount in the range of from about 0.5% to about5% by weight of water in said aqueous well fluid.
 18. The method ofclaim 10 wherein when said activator is a base, it is selected from thegroup consisting of alkali metal hydroxides, alkaline earth metalhydroxides and alkali metal silicates.
 19. The method of claim 10wherein when said activator is a buffer, it is selected from the groupconsisting of a mixture of potassium phosphate and potassiummonohydrogenphosphate and a mixture of sodium carbonate and sodiumbicarbonate.
 20. The method of claim 10 wherein when said activator isone or more oxidizing chemicals, said chemical or chemicals are selectedfrom the group consisting of ammonium persulfate, sodium persulfate,potassium persulfate, sodium chlorite, sodium chlorate, hydrogenperoxide, sodium perborate and sodium peroxy carbonate.
 21. The methodof claim 10 wherein when said activator is one or more oxidizingchemicals, said chemical or chemicals are present in said aqueous wellfluid in an amount in the range of from about 200% to about 1500% byweight of said gas generating chemical or chemicals therein.
 22. Themethod of claim 10 wherein said alkaline aqueous well fluid furthercomprises a gas production rate enhancing agent selected from the groupconsisting of copper sulfate, ferric sulfate and ferric nitrate.
 23. Animproved method of generating gas in and foaming an aqueous well fluidsuch as an aqueous drilling fluid, an aqueous spacer fluid and the likeintroduced into a subterranean zone penetrated by a well bore comprisingthe steps of: (a) combining with said aqueous well fluid a gasgenerating chemical comprised of azodicarbonamide in an amount in therange of from about 0.3% to about 8% by weight of water in said aqueouswell fluid, a mixture of foaming and foam stabilizing surfactantspresent in an amount in the range of from about 0.5% to about 5% byweight of water in said aqueous well fluid and an activator for said gasgenerating chemical comprised of a base or buffer for increasing the pHof said well fluid to in the alkaline range of from about 10 to about 14so that said gas generating chemical reacts with said alkaline wellfluid and gas and foam are formed in said well fluid while it is beingpumped; and (b) pumping said well fluid formed in step (a) into saidwell bore and said subterranean zone.
 24. The method of claim 23 whereinsaid aqueous well fluid is an aqueous drilling fluid.
 25. The method ofclaim 23 wherein said aqueous well treating fluid is an aqueous spacerfluid.
 26. The method of claim 23 wherein when said activator is a base,it is selected from the group consisting of alkali metal hydroxides,alkaline earth metal hydroxides and alkali metal silicates.
 27. Themethod of claim 23 wherein when said activator is a buffer, it isselected from the group consisting of a mixture of potassium phosphateand potassium monohydrogen phosphate and a mixture of sodium carbonateand sodium bicarbonate.
 28. The method of claim 23 wherein said mixtureof foaming and foam stabilizing surfactants is comprised of anethoxylated alcohol ether sulfate surfactant, an alkyl or alkeneamidopropyl betaine surfactant and an alkyl or alkene amidopropyldimethylamine oxide surfactant.
 29. The method of claim 23 wherein saidalkaline aqueous well fluid further comprises a gas production rateenhancing agent selected from the group consisting of copper sulfate,ferric sulfate and ferric nitrate.
 30. An improved method of generatinggas in and foaming an aqueous well fluid such as an aqueous drillingfluid, an aqueous spacer fluid and the like introduced into asubterranean zone penetrated by a well bore comprising the steps of: (a)combining with said aqueous well fluid a gas generating chemicalcomprised of azodicarbonamide in an amount in the range of from about0.3% to about 8% by weight of water in said aqueous well fluid, amixture of foaming and foam stabilizing surfactants present in an amountin the range of from about 0.5% to about 5% by weight of water in saidaqueous well fluid and an activator for said gas generating chemicalcomprised of an oxidizing chemical so that said gas generating chemicalreacts with said oxidizing chemical and gas and foam are formed in saidaqueous well fluid while it is being pumped; and (b) pumping saidaqueous well fluid formed in step (a) into said well bore and saidsubterranean zone.
 31. The method of claim 30 wherein said aqueous wellfluid is an aqueous drilling fluid.
 32. The method of claim 30 whereinsaid aqueous well fluid is an aqueous spacer fluid.
 33. The method ofclaim 30 wherein when said activator is an oxidizing chemical, saidchemical is selected from the group consisting of ammonium persulfate,sodium persulfate, potassium persulfate, sodium chlorite, sodiumchlorate, hydrogen peroxide, sodium perborate and sodium peroxycarbonate.
 34. The method of claim 30 wherein when said activator is anoxidizing chemical, said oxidizing chemical is present in said aqueouswell fluid in an amount in the range of from about 200% to about 1500%by weight of said gas generating chemical or chemicals therein.
 35. Themethod of claim 30 wherein said mixture of foaming and foam stabilizingsurfactants is comprised of an ethoxylated alcohol ether sulfatesurfactant, an alkyl or alkene amidopropyl betaine surfactant and analkyl or alkene amidopropyl dimethylamine oxide surfactant.
 36. Themethod of claim 30 wherein said mixture of foaming and foam stabilizingsurfactants is present in said aqueous well fluid in an amount in therange of from about 0.5% to about 5% by weight of water in said aqueouswell fluid.
 37. An improved method of chemically generating gas andfoaming an aqueous acid solution which is introduced into a subterraneanzone penetrated by a well bore to increase the hydrocarbon permeabilityof the zone comprising the steps of: (a) combining an aqueous solutionor dispersion of one or more gas generating chemicals with an activatorfor the gas generating chemicals selected from the group consisting of abase or buffer for increasing the pH of the aqueous solution ordispersion to in the alkaline range of from about 10 to about 14 and anoxidizing chemical or chemicals so that the gas generating chemicalsreact with the alkaline solution or dispersion or the oxidizingchemicals to generate gas; (b) combining said gas with said aqueous acidsolution in an amount sufficient to foam said aqueous acid solution assaid aqueous acid solution is pumped into said well bore and saidsubterranean zone whereby said aqueous acid solution is foamed.
 38. Themethod of claim 37 wherein said gas generating chemical or chemicals insaid aqueous solution or dispersion are selected from the groupconsisting of hydrazine and its salts with acids, azodicarbonamide,azobis(butyronitrile), p-toluene sulfonyl hydrazide, p-toluene sulfonylsemicarbazide, carbohydrazide, p-p′-oxybis(benzenesulfonylhydrazide) andmixtures thereof.
 39. The method of claim 37 wherein said gas generatingchemical is selected from the group consisting of azodicarbonamide andcarbohydrazide.
 40. The method of claim 37 wherein said gas generatingchemical or chemicals are present in said aqueous solution or dispersionin an amount in the range of from about 0.1% to about 10% by weight ofwater therein.
 41. The method of claim 37 wherein when said activator isa base, it is selected from the group consisting of alkali metalhydroxides, alkaline earth metal hydroxides and alkali metal silicates.42. The method of claim 37 wherein when said activator is a buffer, itis selected from the group consisting of a mixture of potassiumphosphate and potassium monohydrogen phosphate and a mixture of sodiumcarbonate and sodium bicarbonate.
 43. The method of claim 37 whereinwhen said activator is an oxidizing chemical, it is selected from thegroup consisting of ammonium persulfate, sodium persulfate, potassiumpersulfate, sodium chlorite, sodium chlorate, hydrogen peroxide, sodiumperborate and sodium peroxy carbonate.
 44. The method of claim 37wherein when said activator is an oxidizing chemical, it is present insaid aqueous solution or dispersion in an amount in the range of fromabout 200% to about 1500% by weight of said gas generating chemicaltherein.
 45. The method of claim 37 wherein said acid in said aqueousacid solution is an inorganic acid selected from the group consisting ofhydrochloric acid, hydrofluoric acid, fluoboric acid and mixturesthereof.
 46. The method of claim 37 wherein said acid in said aqueousacid solution further comprises an organic acid selected from the groupconsisting of formic acid, acetic acid, citric acid, lactic acid,thioglycolic acid, glycolic acid and mixtures thereof.
 47. The method ofclaim 45 wherein said inorganic acid is present in said aqueous acidsolution in an amount in the range of from about 5% to about 30% byweight of said aqueous acid solution.
 48. The method of claim 46 whereinsaid organic acid is present in said aqueous acid solution in an amountin the range of from about 0% to about 10% by weight of aqueous acidsolution.